home *** CD-ROM | disk | FTP | other *** search
/ More MacCube 2: Games / More MacCube Vol 2 Games.bin / Games / Xconq 7.0.1 / lib / roman.g < prev    next >
Text File  |  1995-08-22  |  9KB  |  397 lines

  1. (game-module "roman"
  2.   (title "Ancient Rome")
  3.   (blurb "Ancient Rome, ca 100 BC to 200 AD")
  4.   (notes 
  5.    ("Period under construction."
  6.     ""
  7.     "The Roman Republic and Empire from 100 BC to 200 AD."
  8.     ""
  9.     "Massimo Campostrini (campo@sunthpi3.difi.unipi.it)"
  10.     ))
  11.   (variants
  12.    (world-seen false)
  13.    (see-all false)
  14.    (world-size (60 30 360))
  15.    ("Large Countries" large
  16.     (true (set country-radius-max 100))
  17.     )
  18.    )
  19.   )
  20.  
  21.  
  22. (unit-type infantry (char "i") (image-name "pikeman")
  23.   (help "light infantry")
  24. )
  25. (unit-type cavalry (char "c") (image-name "cavalry")
  26.   (help "light cavalry")
  27. )
  28. (unit-type archer (char "a") (image-name "archer")
  29.   (help "archers and slingers")
  30.   (notes "pay attention to arrow supply")
  31. )
  32. (unit-type legion (char "L") (image-name "legion")
  33.   (possible-sides "roman")
  34.   (help "\"division\" of armored soldiers")
  35. )
  36. (unit-type bireme (char "B") (image-name "bireme")
  37.   (help "small two-decked ship")
  38. )
  39. (unit-type trireme (char "T") (image-name "trireme")
  40.   (possible-sides (not "barbarian"))
  41.   (help "three-decked ship - mainstay of the navies")
  42. )
  43. (unit-type barge (char "U") (image-name "barge")
  44.   (help "troop transport, slow and weak")
  45. )
  46. (unit-type siege-engine (name "siege engine")
  47.   (char "S") (image-name "catapult")
  48.   (possible-sides (not "barbarian"))
  49.   (help "built by infantry for attacking cities")
  50. )
  51. (unit-type camp (char "/") (image-name "tents")
  52.   (help "fortified camp")
  53. )
  54. (unit-type tribe(char "X") (image-name "tribe")
  55. ; (possible-sides (or "barbarian" "independent")) ; is this a good idea?
  56.   (help "wandering barbarian tribe")
  57. )
  58. (unit-type oppidum(char "V") (image-name "village2")
  59.   (help "village")
  60. )
  61. (unit-type civitas (char "*") (image-name "walltown")
  62.   (help "typical city")
  63. )
  64. (unit-type urbs (char "@") (image-name "parthenon")
  65.   (possible-sides (not "barbarian"))
  66.   (help "large city")
  67. )
  68.  
  69. (material-type food (help "what everybody has to eat"))
  70. (material-type wood (help "raw materials for building things"))
  71. (material-type stones (help "ammo for siege engines"))
  72. (material-type arrows (help "ammo for archers"))
  73.  
  74. (define i infantry)
  75. (define c cavalry)
  76. (define a archer)
  77. (define L legion)
  78. (define B bireme)
  79. (define T trireme)
  80. (define U barge)
  81. (define S siege-engine)
  82. (define / camp)
  83. (define X tribe)
  84. (define V oppidum)
  85. (define * civitas)
  86. (define @ urbs)
  87.  
  88. (include "stdterr")
  89. ; more land, more forest
  90. ;                                sea sha swa des pla for mou ice
  91. (add cell-t* alt-percentile-min (  0  48  50  50  51  51  90  99))
  92. (add cell-t* alt-percentile-max ( 48  50  51  90  90  90  99 100))
  93. (add cell-t* wet-percentile-min (  0   0  20   0  20  60   0   0))
  94. (add cell-t* wet-percentile-max (100 100 100  20  60 100 100 100))
  95.  
  96. (define cities (V * @))
  97. (define makers (X V * @))
  98. (define places (/ V * @))
  99. (define troops (i c a L S))
  100. (define ships (B T U))
  101. (define movers (i c a L B T U S X))
  102. (define water (sea shallows))
  103. (define land (swamp plains forest desert mountains))
  104.  
  105. (table road-chance ((* @) (* @) (1 5) (10 90)))
  106.  
  107. ;;; Static relationships.
  108.  
  109. (table vanishes-on
  110.   (troops water true)
  111.   (places water true)
  112.   (ships land true)
  113.   (ships road true)
  114.   (u* ice true)
  115. )
  116.  
  117. ;; Unit-unit capacities.
  118.  
  119. (table unit-size-as-occupant
  120.   (u* u* 500)
  121. ;             i c a L B T U  S   X
  122.   (movers u* (1 2 1 4 2 4 6 500 500))
  123. )
  124. (add (B T U / V X * @) capacity (1 2 4 8 8 10 25 100))
  125. (table occupant-max
  126.   (u* u* 100)
  127.   (ships ships 0)
  128. )
  129.  
  130. ;;; Unit-terrain capacities.
  131.  
  132. ;; Limit units to 4 in one cell.
  133. ;;  Places cover the entire cell, however.
  134.   
  135. (table unit-size-in-terrain
  136.   (u* t* 4)
  137.   (L t* 8)
  138.   (places t* 16)
  139. )
  140. (add t* capacity 16)
  141.  
  142. ;;; Unit-material capacities.
  143.  
  144. (table unit-storage-x
  145.   (u* m* 0)
  146. ;              i c a  L  B  T  U S  /  X  V  *   @ 
  147.   (u* food   ( 5 8 5 10 10 20 40 5 10 30 30 50 200))
  148.   (u* wood   ( 8 4 4 16 12 16 25 0 20 20 30 50 150))
  149.   (u* stones ( 2 1 1  4  4  6 12 5 10 10 30 50 150))
  150.   (u* arrows ( 2 1 4  4  4  6 10 0 10 15 20 30 100))
  151. )
  152.  
  153. ;; A game's starting units will be full by default.
  154. (table unit-initial-supply (u* m* 9999))
  155.  
  156. ; i c a L B T U S / X V * @ 
  157.  
  158. (add places already-seen true)
  159. (add X already-seen true)
  160. (add cities see-always true)
  161. (table visibility
  162.   (u* t* 100)
  163.   (movers (mountains forest) 10)
  164.   ((i a) (swamp plains desert) 30)
  165.   ((S X) (mountains forest) 30)
  166. )
  167. ;                    i c a L B T U S /  X  V   * @ 
  168. (add u* stack-order (1 3 2 4 5 7 6 8 9 10 11 12 13))
  169.  
  170. ;;; Actions.
  171.  
  172. ;                      i  c  a  L  B  T  U  S / X V * @ 
  173. (add u* acp-per-turn ( 2  8  2  4  4  4  2  1 1 2 1 2 4))
  174. (add movers acp-min  (-2 -8 -2 -4 -4 -4 -3 -3  -2))
  175.  
  176. ;;; Movement.
  177.  
  178. (add places speed 0)
  179. (add movers speed 100)
  180. (table mp-to-enter-unit
  181.    (u* u* 0)
  182. )
  183.  
  184. (table mp-to-enter-terrain 
  185.   (u* t* 99)
  186.   (troops land 2)
  187.   (L land 4)
  188.   (c (forest mountains) 8)
  189.   ((S X) land 2)
  190.   (ships water 1)
  191.   (troops road 0)
  192. ;                i c a L  S
  193.   (troops river (2 8 2 4 99))
  194.   (X river 2)
  195. )
  196. (table mp-to-traverse
  197.   (u* (river road) 99)
  198.   (ships river 2)
  199.   (troops road 1)
  200.   ((L c S X) road 2)
  201. )
  202.  
  203. ;;; Construction.
  204.  
  205. ;           i  c  a  L  B  T  U  S / X V * @ 
  206. (add u* cp (6 15 10 20 16 24 12 10 8 1 1 1 1))
  207. (table acp-to-create
  208.   ((i L) (S /) 1)
  209.   (cities troops 1)
  210.   (cities ships 1)
  211.   (X troops 1)
  212.   ((X V) (L T) 0)
  213.   (X (i a B U) 2)
  214.   (V (c B U) 2)
  215. )
  216. (table cp-on-creation
  217.   ((i L) (S /) 1)
  218.   (cities troops 1)
  219.   (cities ships 1)
  220. )
  221. (table acp-to-build
  222.   ((i L) (S /) 1)
  223.   (cities troops 1)
  224.   (cities ships 1)
  225.   (X troops 1)
  226.   ((X V) (L T) 0)
  227.   (X (i a B U) 2)
  228.   (V (c B U) 2)
  229. )
  230. (table cp-per-build
  231.   ((i L) (S /) 1)
  232.   (makers troops 1)
  233.   (makers ships 1)
  234. )
  235. (table occupant-can-construct
  236.   (u* u* false)
  237. )
  238.  
  239. (table consumption-on-creation
  240.   ((B T U S /) wood (15 25 15 8 8))
  241. )
  242.  
  243. ;; Automatic repair work.
  244. (add troops hp-recovery 0.25)
  245. (add ships  hp-recovery 0.25)
  246. (add cities hp-recovery 0.50)
  247.  
  248. ;;; Production.
  249.  
  250. ;; should actually get food and wood from terrain
  251. (table base-production
  252.   (troops food 1)
  253.   (c food 2)
  254.   ((/ X V * @) food   (5 5 10 20 40))
  255.   ((/ X V * @) wood   (1 3  2  3  5))
  256.   ((/ X V * @) arrows (1 1  1  2  3)) 
  257.   ((/ X V * @) stones (1 1  1  2  3)) 
  258. )
  259.  
  260. (table productivity
  261.   (u* t* 0)
  262.   (troops (plains forest) 100)
  263.   (c forest 50)
  264.   (/ land-t* (30 100 50 30))
  265.   (X land-t* (30 100 50 30))
  266.   (V land-t* (30 100 50 30))
  267.   (* land-t* (30 100 50 30))
  268.   (@ land-t* (30 100 50 30))
  269. )
  270.  
  271. (table base-consumption
  272.   ((i a L) food 1)
  273.   (c food 2)
  274. )
  275. (table hp-per-starve
  276.   (movers food 0.5)
  277. )
  278.  
  279. ;;; Combat.
  280.  
  281. (table acp-to-attack
  282.   (u* u* 1)
  283.   ((a S) u* 0)
  284. )
  285. (table acp-to-defend
  286.   (u* u* 1))
  287. (add (a S) range 1)
  288. (add (a S) acp-to-fire 1)
  289.  
  290. ;               i c a L B T U S /  X  V  *  @ 
  291. (add u* hp-max (2 3 2 8 3 6 2 2 5 20 20 50 200))
  292.  
  293. (table hit-chance 
  294.    (u* u* 50) ; for now
  295.    (troops ships 20)
  296.    (ships troops 20)
  297.    (S movers 0)
  298.    (U u* 0)
  299. )
  300.  
  301. (table damage
  302.   (u* u* 1)
  303.   (S (V * @) 4)
  304. )
  305.  
  306. (table capture-chance
  307.   (i (/ X V * @) (20 15 15 10  5))
  308.   (c (/ X V * @) (20 20 10  5  2))
  309.   (L (/ X V * @) (40 40 40 20 10))
  310. )
  311. (table independent-capture-chance
  312.   (i (/ X V * @) (40 20 30 20 10))
  313.   (c (/ X V * @) (40 30 20 10  5))
  314.   (L (/ X V * @) (70 50 70 35 20))
  315. )
  316.  
  317. (table ferry-on-entry
  318.    (u* u* over-own)
  319.    (ships movers over-border)
  320. )
  321. (table ferry-on-departure
  322.    (u* u* over-own)
  323.    (ships movers over-border)
  324. )
  325.  
  326. (table protection 
  327.   (/ movers 80)
  328.   (V movers 65)
  329.   (* movers 50)
  330.   (@ movers 25)
  331. )
  332.  
  333. (table consumption-per-attack 
  334.   (a arrows 1)
  335.   (S stones 1)
  336. )
  337. (table hit-by
  338.   (u* arrows 1)
  339.   (places stones 1)
  340.   (ships stones 1)
  341. )
  342.  
  343. (table surrender-range (u* u* 1))
  344. (add u* acp-to-change-side 1)
  345.  
  346. (add u* point-value 0)
  347. (add makers point-value (1 1 3 9))
  348.  
  349. (table favored-terrain
  350.   (u* t* 0)
  351.   (u* plains 100)
  352.   (u* forest 20)
  353.   (ships t* 0)
  354.   (ships water 100)
  355.   (X (plains desert forest mountains) (30 20 100 30))
  356.   (V (desert forest mountains) (20 50 30))
  357.   (* (desert forest mountains) (10 30 20))
  358. )
  359. (table independent-density
  360. ;                     X  V  *  @
  361.   (makers plains    (20 60 40 10))
  362.   (makers forest    (80 40 20  1))
  363.   (makers mountains (20 20 10  1))
  364.   (makers desert    (10 10  5  1))
  365. )
  366.  
  367. (add makers start-with 1)
  368.  
  369. ;; Naming.
  370.  
  371. (include "town-names")
  372. (add places namer "random-town-names")
  373.  
  374. ;; Sides.
  375.  
  376. (set sides-min 2)
  377.  
  378. (scorekeeper (do last-side-wins)) ; for now
  379.  
  380. ; the side library really needs work (what about emblems?)
  381. (set side-library '(
  382.   ((name "Marius")
  383.    (class "roman"))
  384.   ((name "Sulla")
  385.    (class "roman"))
  386.   ((name "Parthia") (long-name "Regnum Parthorum") (adjective "Parthian")
  387.    (class "civilized"))
  388.   ((name "Macedonia") (long-name "Regnum Macedoniae") (adjective "Macedonian")
  389.     (class "civilized"))
  390.   ((name "Carthago") (adjective "Punic")
  391.    (class "civilized"))
  392.   ((name "Aedui") (adjective "Aeduan")
  393.    (class "barbarian"))
  394.   ((name "Teutones") (adjective "Teutonian")
  395.    (class "barbarian"))
  396.   ))
  397.